package cn.steel.service;

import cn.steel.domain.dto.SupplierRatingDto;
import cn.steel.domain.entity.SupplierRating;
import cn.steel.domain.vo.SupplierRatingVo;
import com.github.pagehelper.Page;

import java.util.List;

public interface SupplierRatingService {
    void submitRating(Long userId, SupplierRating rating);
    Page<SupplierRating> getRatingsPaginated(Long supplierId, int page, int size);
    Double getAverageRating(Long supplierId);
    List<SupplierRatingVo> getRatingsBySupplier(Long supplierId);
    List<SupplierRatingVo> getRatingsByUser(Long userId);
    SupplierRatingVo getRatingDetail(Long orderId);
    boolean canRateOrder(Long orderNo, Long userId);

    void submitBuyerRating(Long userId, Long supplierId, SupplierRatingDto ratingDto);


    /**
     * 提交供应商评价
     * @param supplierRatingDto 评价数据传输对象
     */
    void submitRating(SupplierRatingDto supplierRatingDto) throws Exception;

}